import request from '@/utils/request'

export function add(token, data) {
  return request({
    url: 'merchant/merchant/add',
    method: 'post',
    params: { token },
    data
  })
}
export function edit(token, data) {
  return request({
    url: 'merchant/merchant/edit',
    method: 'post',
    params: { token },
    data
  })
}
export function del(token, data) {
  return request({
    url: 'merchant/merchant/delete_merchant',
    method: 'post',
    params: { token },
    data
  })
}
export function info(token, data) {
  return request({
    url: 'merchant/merchant/info',
    method: 'post',
    params: { token },
    data
  })
}
export function getList(token, data) {
  return request({
    url: 'merchant/merchant/get_merchant_list',
    method: 'post',
    params: { token },
    data
  })
}
export function invoke(token, data) {
  return request({
    url: 'merchant/merchant/invoke',
    method: 'post',
    params: { token },
    data
  })
}
export function forbidden(token, data) {
  return request({
    url: 'merchant/merchant/forbidden',
    method: 'post',
    params: { token },
    data
  })
}
export function getSearchLists(token, data) {
  return request({
    url: 'merchant/merchant/get_merchant_list',
    method: 'post',
    params: { token },
    data
  })
}
export function sendMessage(token, mobile, id) {
  return request({
    url: 'verify/verify_code/code_list',
    method: 'post',
    params: { token: token, mobile: mobile, id: id }
  })
}
export function getIndexList(mobile, content) {
  return request({
    url: 'merchant/merchant/get_list_index',
    method: 'post',
    params: { mobile: mobile, content: content }
  })
}
export function sendMessage1(token, mobile, merchantName, id) {
  return request({
    url: 'verify/verify_code/code_list',
    method: 'post',
    params: { token: token, mobile: mobile, merchantName: merchantName, id: id }
  })
}

export function tags(token, data) {
  return request({
    url: 'merchant/tags/get_select',
    method: 'post',
    params: { token },
    data
  })
}

export function getCompanyStatistics(mobile, content) {
  return request({
    url: 'merchant/merchant/get_company_statistics',
    method: 'post',
    params: { mobile: mobile, content: content }
  })
}

export function companyGoodsDataStatistics(mobile, content) {
  return request({
    url: 'order/order/company_goods_data_statistics',
    method: 'post',
    params: { mobile: mobile, content: content }
  })
}

export function get_merchant_admin_url(url) {
  return request({
    url: 'merchant/merchant/get_merchant_admin_url',
    method: 'post',
    params: { merchant_admin_url: url }
  })
}
